| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The ToCWidget relies on Javascript to display the headings. If JS is
disabled in the browser, the widget is empty. For a better UX, we
should use dynamic imports. Now, the ToC is only displayed when JS is
enabled.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* make sure url are absolutes
* nest breadcrumb schema in webpage schema
* trim HTML tags from content/description
* use a regular script instead of next/script (with the latter the
schema is not updated on route change)
* place the script in document head
* add keywords, wordCount and readingTime keys in BlogPosting schema
* fix breadcrumbs in search page (without query)
* add tests (a `MatchInlineSnapshot` will be better but Prettier 3 is
not supported yet)
|
| |
|
|
|
|
|
| |
* use next/router to get the slug instead of using props
* handle cases where the current page title is not provided
* update JSON-LD schema to match the example in documentation
* add tests
|
| |
|
|
|
|
|
|
|
|
|
| |
* refactor ProjectOverview component to let consumers handle the value
* extract project overview depending on Github to avoid fetching
Github API if the project is not on Github
* wrap dynamic import in a useMemo hook to avoid infinite rerender
* fix table of contents by adding a useMutationObserver hook to refresh
headings tree (without it useHeadingsTree is not retriggered once the
dynamic import is done)
* add Cypress tests
|
| |
|
|
|
|
| |
* add useTopic and useTopicsList hooks to refresh data
* add a table of contents
* add Cypress tests
|
| |
|
|
|
|
|
|
|
|
|
| |
* add a table of contents (however posts heading are
not included)
* rename posts list section title
* add a useThematic hook to refresh thematic contents
* add a useThematicLists hook to refresh thematics list
* add a `notIn` filter in thematics list fetcher to directly
remove unwanted thematics
* add Cypress tests
|
| |
|
|
|
|
|
|
|
|
| |
When I refactored the fetchers and convertors in #f111685 I forgot to
convert WPThematicPreview and WPTopicPreview so the thematics and
topics pages was broken.
I also:
* removed the ToC added by error in #70b4f63
* fix heading styles
* fix website url in topics pages
|
| |
|
|
|
|
|
| |
If we use fetchPostsCount inside fetchAllPostsSlugs, we might have
problems to test fetchAllPostsSlugs failure. So it is better to let
the consumer pass the posts count as an argument. The same applies
to thematics and topics.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The Typescript mapped types was useful for autocompletion in fetchers
but their are harder to maintain. I think it's better to keep each
query close to its fetcher to have a better understanding of the
fetched data. So I:
* colocate queries with their own fetcher
* colocate mutations with their own mutator
* remove Typescript mapped types for queries and mutations
* move data convertors inside graphql services
* rename most of data types and fetchers
|
| |
|
|
|
|
|
|
|
| |
* split pages in smaller components (it is both easier to maintain and
more readable, we avoid the use of fragments in pages directory)
* extract breadcrumbs from article tag (the navigation is not related
to the page contents)
* remove useReadingTime hook
* remove layout options except `isHome`
|
| |
|
|
|
|
| |
* replace `items` prop on MetaList with `children` prop: it was too
restrictive and the global options was not really useful. It is better
too give control to the consumers.
|
| |
|
|
|
|
|
| |
It does not make sense to re-export an existing object through a hook.
On some pages both the hook and the object was imported...
It is better to use the CONFIG (previously settings) object directly
and by doing it we avoid potential errors because of conditional hooks.
|
| |
|
|
|
|
|
| |
* avoid List component repeat
* rewrite tests and CSS
* add an id to LinksWidgetItemData (previously LinksListItems) type
because the label could be duplicated
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove NoResults component and move logic to Search page
* add a usePostsList hook
* remove Pagination from PostsList (it is only used if javascript is
disabled and not on every posts list)
* replace `byYear` prop with `sortByYear`
* replace `loadMore` prop with `onLoadMore`
* remove `showLoadMoreBtn` (we can use `loadMore` prop instead to
determine if we need to display the button)
* replace `titleLevel` prop with `headingLvl`
* add `firstNewResult` prop to handle focus on the new results when
loading more article (we should not focus a useless span but the item
directly)
|
| |
|
|
|
|
| |
* remove searchPage prop (the consumer should handle the submit)
* change onSubmit type
* use `useForm` hook to handle the form
|
| |
|
|
|
|
| |
Instead of using helpers functions to format the date each time we need
to use a time element, it makes more sense to create a new component
dedicated to this task.
|
| |
|
|
|
|
| |
It removes items complexity by allowing consumers to use any label/value
association. Translations should also be defined by the consumer.
Each item can now be configured separately (borders, layout...).
|
| |
|
|
|
|
|
|
| |
The styles applied to ResponsiveImage are related to the figure and
figcaption elements. Those elements could be use with other contents
than images. So I extracted them in a Figure component. The
ResponsiveImage component is no longer useful: the consumer should use
the Image component from `next` and wrap it in a link if needed.
|
| |
|
|
|
|
| |
The HeadingButton component was only used inside Widget component and
it is not very useful on its own so I merge the two components in a
new Collapsible component.
|
| |
|
|
|
|
|
|
| |
It makes it easier to change a route if needed and it avoid typo
mistakes.
I also refactored a bit the concerned files to be complient with the
new ESlint config. However, I should rewrite the pages to reduce
the number of statements.
|
| |
|
|
|
|
| |
Next expect a default export for pages so only those components should
use default exports. Everything else should use named exports to
reduce the number of import statements.
|
| |
|
|
|
|
| |
Using paths aliases starting with "@" can be confusing and can lead to
conflict with existings modules. I prefer to use relative paths to
avoid extra configuration in tools because of these aliases.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* Improve wp-blocks-columns, wp-block-quote and some images
* Make Sharing widget consistent between pages
* Remove margin option from lists
* Fix Topic logo alignement
|
| | |
|
| |
|
|
|
| |
It prevents to rerender the common components between pages (header,
footer...).
|
| |
|
|
|
|
| |
* add logo to topics pages and links
* add Prism styles to articles
* and a few other adjustements
|
| | |
|
| | |
|
| |
|
|
|
| |
Since I'm using new components, I will also rewrite the GraphQL queries
so it is easier to start from scratch.
|
| |
|
|
|
| |
I'm not able to configure SWC plugins in Next.js so to make it works,
all translation must have an id.
|
| |
|
|
|
|
|
|
| |
* refactor: replace script tags with next/script
Since next.js v12.1.0 some warnings was displayed because I was using
some script tags.
* build(deps): bump next-themes to v0.1.1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Squashed commit of the following:
commit 49c1b3b1556a0eb91c429a961fedd2bded8ffd47
Author: Armand Philippot <git@armandphilippot.com>
Date: Wed Feb 16 15:17:52 2022 +0100
chore: add headline field to blogPosting schema
commit 42214c6f032cc899ec252a9387be35dcad738546
Author: Armand Philippot <git@armandphilippot.com>
Date: Wed Feb 16 15:09:11 2022 +0100
chore: update the searchAction markup and add query-input
Google was complaining about "query-input" which is not in Schema.org
representation. So I added it.
commit 5f29226d937cbdcd262df2793f1588435d850f02
Author: Armand Philippot <git@armandphilippot.com>
Date: Wed Feb 16 14:32:14 2022 +0100
chore: remove breadcrumb from homepage
The breadcrumb is not displayed on the homepage, so the breadcrumb
field should not appear inside Schema markup.
|
| |
|
|
|
| |
By fetching the data in getStaticProps, I can display the data even
for users with Javascript disabled.
|
| | |
|
| |
|
|
|
|
|
|
| |
I had errors with next build because of fallback. I need to return
early if the path does not exists, if not Next complains about
undefined variables.
I don't think it was related but I also fix the paths format in
getStaticPaths, I forgot the params object in some dynamic routes.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
The previous method was not working so I tried a different approach.
Translation is loaded but I'm still getting warnings:
* Plurals for locale undefined aren't loaded
* Text content did not match
I can't figure how to fix them...
|
| | |
|
| |
|
|
|
| |
I change the name in graphql endpoint, so I decided to repercute this
change here.
|
| | |
|
| |
|
|
|
| |
I will need the country code, so I think it makes more sense to gather
them inside the same property.
|
| |
|
|
| |
I also added the featured image on single article.
|
| |
|
|
|
|
|
|
|
| |
I'm now using a widget that can be expanded/collapsed. It also allows
me to handle more effectively widgets overflow and to avoid styles
repetitions.
However, with stylelint rule "no-descending-specificity", I'm not sure
if the stylesheets are really logical... Maybe I should deactivate this
rule.
|
| | |
|